This assignment allow you to implement Queue structure using array collection and compare the arrayqueues vs linkedqueues.
You’ll need to grab the assignment from the link below and download the entire folder to your computer before proceeding. I would highly suggest then opening the entire folder in VS Code, as it will make it very easy to edit the different files and is necessary for VS Code to find certain libraries. When you are finished, upload your completed templates back to GitHub. Don’t worry about changing any file names, you want to overwrite the original template files.
Accept AssignmentArrayQueue Implementation Worksheet
Instructions
Implement the ArrayQueue class using the provided template (arrayqueue.py). Use your understanding of array-based queues and refer to the ArrayStack implementation for guidance. Your instructor will provide a testqueue.py file to test your code.
Tasks
- Complete the
ArrayQueueclass by implementing all required methods:__init__(constructor)__iter__peekaddpopclear
- Use the
ArrayStackas a guide for array resizing and index management. - Ensure your queue supports circular array behavior for efficient use of space.
- After you finish, write a short comment in your file comparing the time and space complexity (Big O) of
ArrayQueueandLinkedQueuefor all major operations.
Submission
- Edit
arrayqueue.pywith your implementation. - Add your complexity comparison comment at the end of the file.
- Test your code using
testqueue.py. - Submit your completed file as instructed.